package cn.imnaer.service.rest.view.model;

import cn.imnaer.service.persistence.model.Collect;
public class CollectGroupView {
	private String collectGroupId;
	private String userId;
	private String name;
	private String image;
	private String introduction;
	private long  createTime;

	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getImage() {
		return image;
	}
	public void setImage(String image) {
		this.image = image;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public long getCreateTime() {
		return createTime;
	}
	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}
	public String getCollectGroupId() {
		return collectGroupId;
	}
	public void setCollectGroupId(String collectGroupId) {
		this.collectGroupId = collectGroupId;
	}
	public  static CollectGroupView valueOf(Collect collect){
		CollectGroupView view =new CollectGroupView();
		view.setName(collect.getName());
		view.setCollectGroupId(collect.getGroupId());
		view.setCreateTime(collect.getCreateTime());
	    long size=	collect.getScenicIds().size();
		view.setIntroduction(size+"个景点");
		return view;
	}
	
		
		
	}

	
	
		

